package cn.memedai.router.demo;

import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import cn.memedai.router.annotation.Route;

@Route("Test")
public class TestActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);

        TextView text = (TextView) findViewById(R.id.text_test);
        Bundle bundle = getIntent().getExtras();
        if (bundle != null && !bundle.isEmpty()) {
            StringBuilder sb = new StringBuilder();
            sb.append("收到页面传递数据").append("\nid:")
                    .append(bundle.getString("id"))
                    .append("\n")
                    .append("name:")
                    .append(bundle.getString("name"));
            text.setText(sb.toString());
        }
    }
}
